/**
 * 
 */
package com.m7012e.a_remote.android_remote.network.protocol.echoProtocol.internEvents;

/**
 * @author leoj
 *
 */
public abstract class DaemonFoundEvent implements Comparable<DaemonFoundEvent>{
	public final boolean available;
	public final int distance;
	/**
	 * 
	 */
	public DaemonFoundEvent(boolean available, int distance) {
		this.available = available;
		this.distance = distance;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public abstract String toString();
	/* (non-Javadoc)
	 * @see java.lang.Comparable#compareTo(java.lang.Object)
	 */
	@Override
	public int compareTo(DaemonFoundEvent o) {
		return o.distance - this.distance;
	}
	
}
